#include <iostream>

using namespace std;

int main()
{
	string s;
	cin >> s;
	int sum = 0;
	int last = s.back();
	for (int i = 0; i < s.size()-1; i++)
	{
		if ((s[i] - '0' + last - '0') % 2 == 0)
		{
			++sum;
		}
	}
	cout << sum << endl;

	return 0;
}